<?php
class OptionsController extends AppController {

    public $name = 'Options';
    public $helpers = array('Html', 'Form');

    public function index(){
        if(!empty($this->data)){
            if($this->Option->save($this->data)){
                $this->Session->setFlash(__('Configuration changes are saved', true));
            }else{
                $this->Session->setFlash(__('Configuration changes not saved', true));
            }
            unset($this->data);
        }
        $this->data = $this->Option->read(null, 1);
    }

}
?>